Xbasic

SQL::ConnectionGenerateRowQualifiers Method

Syntax

List as C = GenerateRowQualifiers as C (TableInfo as SQL::TableInfo [, LocalTableInfo as SQL::TableInfo,])

Arguments

TableInfoSQL::TableInfo

A SQL::TableInfo object for the table created with the DIM statement.

LocalTableInfoSQL::TableInfo

SQL::TableInfo

Returns

ListCharacter

A CR-LF delimited list of key columns in the format:

<field_name><tab>argument_name<crlf>
If the table has no primary key, row qualifiers are meaningless and no qualifiers are returned.

Description

Generate a crlf delimited list of row qualifiers in the format:

The GenerateRowQualifiers() method generates a list of key columns for a table based on the primary key. This list is used by linked tables to map the column data to the refresh row query generated by the GenerateRefreshRowQuery() method. If the table has no primary key columns, an empty string is returned.

Example

dim conn as SQL::Connection
dim connString as C
dim ti as SQL::TableInfo
connString = "{A5API='Access', FileName='c:\program files\a5v8\mdbfiles\alphasports.mdb'}"
if .not. conn.open(connString)
    ui_msg_box("Error", conn.CallResult.text)
    end
end if
if .not. conn.GetTableInfo(ti, "customer")
    ui_msg_box("Error", conn.CallResult.text)
end if
ui_msg_box("Key Column(s)", conn.GenerateRowQualifiers(ti))
conn.close()

See Also